package com.gitee.wsl.reflect


import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.LocalTime
import kotlin.reflect.KClass

enum class ColType {
    Int,
    Long,
    Double,
    Boolean,
    BigDecimal,
    LocalDate,
    LocalTime,
    LocalDateTime,
    String,
}

fun ColType.toType(): KClass<out Any> = when (this) {
    ColType.Int -> Int::class
    ColType.Long -> Long::class
    ColType.Double -> Double::class
    ColType.Boolean -> Boolean::class
    //ColType.BigDecimal -> BigDecimal::class
    ColType.LocalDate -> LocalDate::class
    ColType.LocalTime -> LocalTime::class
    ColType.LocalDateTime -> LocalDateTime::class
    ColType.String -> String::class
    ColType.BigDecimal -> TODO()
}